home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_1 / mercator < prev    next >
Internet Message Format  |  1995-03-31  |  41KB

  1. From: James Gentles <jdg@hpqtdla.sqf.hp.com>
  2. Subject:  v04i003:  mercator_jg - Transverse Mercator Projections v1.0, Part01/01
  3. Newsgroups: comp.sources.hp48
  4. Followup-To: comp.sys.hp48
  5. Approved: spell@seq.uncwil.edu
  6.  
  7. Checksum: 3542956383 (verify with brik -cv)
  8. Submitted-by: James Gentles <jdg@hpqtdla.sqf.hp.com>
  9. Posting-number: Volume 4, Issue 3
  10. Archive-name: mercator_jg/part01
  11.  
  12. BEGIN_RDM mercator.rdm
  13. Posted below are HP48 programs for performing Transverse Mercator Projections.
  14. They are accompanied by documentation, so should be self-explanitory.
  15.  
  16. Mercator:   Transverse Mercator Projections, for cartographers and others,
  17.             including radio amateurs!
  18.  
  19. Comments & Queries to me at the above address.
  20. Regards
  21.  
  22. James
  23. ---------------------------------------------------------------------
  24.       I have no professional connection with Hewlett-Packard's 
  25.     calculator operations other than as a user of their products.
  26. ---------------------------------------------------------------------
  27. Opinions expressed are my own, and are not intended to be an official
  28.               statement by Hewlett-Packard Company
  29. ---------------------------------------------------------------------
  30. To strive, to seek, to find, and not to yield. Tennyson, "Ulysses".
  31. ---------------------------------------------------------------------
  32. James Gentles     Hewlett Packard,    Amateur: GM4WZP
  33. Queensferry Telecoms Division QTD,      Email: jdg@hpsqf.sqf.hp.com 
  34. Station Road,   South Queensferry,     HPDESK: James Gentles / HP1400 
  35. West Lothian, Scotland,  EH30 9XR.      Phone: + 44  31 331 7663  DDI
  36. ---------------------------------------------------------------------
  37. END_RDM
  38.  
  39. BEGIN_DOC mercator.doc
  40.                 ROUTINES and PROCEDURES for PERFORMING
  41.                    TRANSVERSE MERCATOR PROJECTIONS.
  42.  
  43.                                                           James Gentles
  44.                                                           jdg@hpsqf.sqf.hp.com
  45.                                                           February 1992
  46.  
  47.         1. Introduction
  48.         2. Basics
  49.         3. Pseudo Code for Main Routines
  50.         4. HP48 Routines: Descriptions
  51.         5. HP48 Routines: Programs (ASCII DIR object)
  52.  
  53.  
  54.  
  55. 1. Introduction 
  56.  
  57. This file contains a collection of HP48 programs used for translation
  58. between Latitude/Longitude and Transverse Mercator Projection. The programs
  59. were written specifically to translate between the Great Britain and Ireland
  60. "National Grid" systems, however they could be used for translation between
  61. latitude/longitude and ANY mapping system that uses this projection by
  62. altering the constants used to define the projection conveniently contained
  63. in a list.
  64.  
  65. These programs were written for Amateur Radio use in the UK. Some amateurs
  66. use positioning reference systems based on Latitude and Longitude, where
  67. others use a system based on the UK National Grid which is a Transverse 
  68. Mercator Projection. This file only contains the projection translation part
  69. of this work and as such may be useful to a wider audience.
  70.  
  71. 2. Basics
  72.  
  73. "Mercator Projection" is one of the projections commonly used to show the
  74. whole world in atlases. It's main disadvantage for 'whole world' maps is the
  75. distortion near the poles, making Antartica and Greenland appear much larger
  76. than they actually are. For small parts of the globe (e.g. the UK) this 
  77. projection provides a very accurate model.
  78.  
  79. This system allows a map to contain a regular grid for reference and short
  80. distance calculations. However, because the map is a projection of the surface
  81. of a shape approximating to an oblate spheroid onto a plane (or cylindrical
  82. shaped) piece of paper then these grid lines have a very complex relationship
  83. to latitude and longitude. In "Mercator" projection the map of the world is 
  84. projected onto a cylinder of paper from the globe, where the only point of 
  85. contact between the two is the equator. Transverse Mercator uses the same 
  86. principle, except a line of latitude is used. Absolute accuracy is only 
  87. achieved where the globe touches the map, however by choosing scalings and 
  88. sphere models correctly these errors can be minimised.
  89.  
  90. Although the National Grid Systems are peculiar to the British Isles, the
  91. "Transverse Mercator Projection" system is used elsewhere. The constants 
  92. required for the translation are all included in a list, in this case called
  93. AIRY or IRISH, substitute the constants for your local projection if desired.
  94. It should be possible to use the formulae for "Mercator Projection" by simply
  95. swapping the Latitude and Longitude entries and providing the appropriate 
  96. list of constants.
  97.  
  98. The programs are written specially for the British and Irish Grids, and their
  99. Grid Numbering scheme. This may not be the same as other systems, again
  100. however the programs are structured for the easy removal or modification of 
  101. the numbering scheme. The basic translation provides an output of X and Y
  102. coordinates called eastings and northings. The complication in the UK systems
  103. is that 100Km squares are given grid letters, rather than numbers. In addition
  104. the accuracy is truncated to 100m.
  105.  
  106. The origin of the UK grid is off the SW corner of England, and there are 4 
  107. main squares, each with 500Km sides.  The square nearest the origin is called 
  108. S (South?), and covers most of England. The square north of that is N (North?)
  109. and covers mostly Scotland. The square north of that again is H (Highland?) 
  110. and covers the most northerly islands of Scotland. Finally the eastern 
  111. extremity of England just pokes into square T to the east of square S. These 
  112. letters appear to be named arbitrarily. A pictorial representation follows:
  113.  
  114.  
  115.           1500Km --------------
  116.                  |            |
  117.                  |      H   . |
  118.                  |          / | (Northern Isles)
  119.                  |         .  |
  120.           1000Km ---------/----
  121.                  |   ./----   |
  122.                  |  | / N /.  | (Scotland)
  123.                  | / /|  ./_  |
  124.                  |   //|    | |
  125.            500Km ------|----\--------------
  126.                  |   ._|     \|           |
  127.                  |   |_ S     |_    T     | (England)
  128.                  |   __-      | |         |
  129.                  | _-__________/          |
  130.                0 --------------------------
  131.                  0           500Km       1000Km
  132.  
  133.  
  134. Each of these 500Km squares is divided into 25 100Km squares as follows:
  135.  
  136.             A    B    C    D    E
  137.  
  138.             F    G    H    J    K
  139.  
  140.             L    M    N    O    P
  141.  
  142.             Q    R    S    T    U
  143.  
  144.             V    W    X    Y    Z
  145.  
  146. Note that this is A to Z from top left to bottom right with letter "I" 
  147. omitted. So for example I live at "NT119779" to the nearest 100metres. 
  148. The full reference from datum for this is Eastings 311900, Northings 
  149. 677900. The program XX6-> is used to do the translation from "NT119779"
  150. to the eastings and northings in metres.
  151.  
  152. The Irish grid only covers one of the above described 500Km squares, so
  153. it is identical to the British system except the leading N, S, H or T is
  154. not required.
  155.  
  156. This file contains programs written for a HP48SX calculator, but they were 
  157. originally developed on a HP28S. In translating my code from the HP28 I 
  158. have taken the opportunity of reducing their size slightly, reducing their
  159. execution time by 40%, and taking advantage of some of the HP48's features,
  160. including TAGing. I have also corrected an error in the original HP28 code 
  161. that limited the accuracy to approximately 10m. The routines are now accurate
  162. to better than 0.01 seconds of a degree, the oblate spheroid model is now 
  163. the limiting factor.
  164.  
  165. For those more interested in the mathematics of the projection, I have 
  166. included psudo-code descriptions of the routines to aid understanding. The
  167. routines are all based on Reference Transverse Mercator Projection Constants,
  168. Formulae and Methods, Ordnance Survey Information March 1983
  169.  
  170. 3. Pseudo Code for Main Routines
  171.  
  172. This pseudo-code is based on the following calculator routines and on the 
  173. Ordnance and Survey Document, Transverse Mercator Projection, March 1983. 
  174. The routines use mostly two letter variable names, this does not aid 
  175. readability however these are the calculator variables. Leaving the 
  176. variables like this means that no errors have been introduced in the 
  177. translation to pseudo-code from HP48 code.
  178.  
  179.  
  180. Latitude/Longitude to National Grid Reference
  181.  
  182. Note: All calculations performed in radians
  183. k  = Latitude of point
  184. l  = Longitude of point
  185.  
  186. Constants for AIRY Spheriod for Great Britain National Grid
  187. a  = 6377563.396        Major semi-axis m
  188. b  = 6356256.91            Minor semi-axis m
  189. k0 = .855211333477              True Origin 49 deg N              for
  190. l0 = -3.490658E-2                      2 deg W          GREAT BRITAIN
  191. n0 = -100000             False Origin in m E of true origin
  192. e0 = 400000                     m N of true origin
  193. f0 = .9996012717         Scale factor on Central meridian Fo
  194.  
  195. Constants for AIRY Spheriod for Irish National Grid
  196. a  = 6377563.396        Major semi-axis m
  197. b  = 6356256.91            Minor semi-axis m
  198. k0 = .933751149817        True Origin 53.5 deg N          for
  199. l0 = -.139626340159                     8   deg W            IRELAND 
  200. n0 = 250000                 False Origin in m E of true origin
  201. e0 = 200000                         m N of true origin
  202. f0 = 1.000035             Scale factor on Central meridian Fo
  203.  
  204. p  = l - l0
  205. k3 = k - k0                     difference in latitude
  206. k4 = k + k0                     sum of latitudes
  207. call subroutine ABNE, uses a b f0      and returns a1 b1 n1 e2
  208. call subroutine AOM,  uses n1 k3 k4 b1 and returns m
  209. call subroutine VRH2, uses a1 e2 k     and returns v r h2
  210. J3 = 'm+n0'                            Formula 1 
  211. J4 = 'v/2*SIN(k)*COS(k)'                     Formula 2
  212. J5 = 'v/24*SIN(k)*COS(k)^3*(5-TAN(k)^2+9*h2)'             Formula 3
  213. J6 = 'v/720*SIN(k)*COS(k)^5*(61-58*TAN(k)^2+TAN(k)^4)'         Formula 3a
  214. northings = 'J3+p^2*J4+p^4*J5+p^6*J6'             COMPUTE NORTHINGS
  215.              (answer in metres from origin)
  216. J7 = COS(k) * v                            Formula 4
  217. J8 = 'v/6* COS(k)^3*(v/r-TAN(k)^2)'                Formula 5
  218. J9 = 'v/120*COS(k)^5*(5-18*TAN(k)^2+TAN(k)^4+14*h2-58*TAN(k)^2*h2)' Formula 6
  219. eastings  = 'e0+p*J7+p^3*J8+p^5*J9'             COMPUTE EASTINGS
  220.              (answer in metres from origin)
  221.  
  222. Grid reference can now be easily obtained from eastings and northings.
  223.  
  224.  
  225.  
  226. National Grid Reference to Latitude/Longitude
  227.  
  228. Note: All calculations performed in radians
  229. Initially decode grid reference into metres from origin, to obtain
  230. e  = eastings of point (in metres from origin)
  231. n  = northings of point (in metres from origin)
  232.  
  233. Constants for AIRY Spheriod for Great Britain National Grid
  234. a  = 6377563.396        Major semi-axis m
  235. b  = 6356256.91            Minor semi-axis m
  236. k0 = .855211333477              True Origin 49 deg N              for
  237. l0 = -3.490658E-2                      2 deg W          GREAT BRITAIN
  238. n0 = -100000             False Origin in m E of true origin
  239. e0 = 400000                     m N of true origin
  240. f0 = .9996012717         Scale factor on Central meridian Fo
  241.  
  242. Constants for AIRY Spheriod for Irish National Grid
  243. a  = 6377563.396        Major semi-axis m
  244. b  = 6356256.91            Minor semi-axis m
  245. k0 = .933751149817        True Origin 53.5 deg N          for
  246. l0 = -.139626340159                     8   deg W            IRELAND 
  247. n0 = 250000                 False Origin in m E of true origin
  248. e0 = 200000                         m N of true origin
  249. f0 = 1.000035             Scale factor on Central meridian Fo
  250.  
  251. y1 =  e - e0
  252. call subroutine ABNE, uses a b f0      and returns a1 b1 n1 e2
  253. call subroutine PHI,  uses n n0 n1 k0 a1 b1 and returns k k3 k4
  254. call subroutine VRH2, uses a1 e2 k     and returns v r h2
  255. J3 = TAN(k)/(2*r*v)                        Formula 7
  256. J4 = 'TAN(k)/(24*r*v^3)*(5+3*TAN(k)^2+h2-9*TAN(k)^2*h2)'    Formula 8
  257. J5 = 'TAN(k)/(720*r*v^5)*(61+90*TAN(k)^2+45*TAN(k)^4)'      Formula 9
  258. Latitude = 'k-y1^2*J3+y1^4*J4-y1^6*J5'            COMPUTE LATITUDE
  259. J6 = 1/(COS(k)*v)                        Formula10
  260. J7 = '1/(COS(k)*6*v^3)*(v/r+2*TAN(k)^2)'             Formula11
  261. J8 = '1/(COS(k)*120*v^5)*(5+28*TAN(k)^2+24*TAN(k)^4)'        Formula12
  262. J9 = '1/(COS(k)*5040*v^7)*(61+662*TAN(k)^2+1320*TAN(k)^4+720*TAN(k)^6)' 12a
  263. Longitude = 'l0+y1*J6-y1^3*J7+y1^5*J8-y1^7*J9'        COMPUTE LONGITUDE
  264.  
  265. Finally translate Latitude and longitude back into degrees, minutes and seconds
  266.  
  267.  
  268.  
  269. SUBROUTINES used in National Grid Ref / Latitude & Longitude TRANSFORMS
  270.  
  271. VRH2     (uses a1 e2 k and returns v r h2)
  272. v  = 'a1/SQRT(1-e2*SIN(k)^2)'
  273. r  = 'v*(1- e2)/(1-e2*SIN(k)^2)'
  274. h2 = '(v/r)-1' 
  275.  
  276. AOM     (uses n1 k3 k4 b1 and returns m), Compute Developed Arc of Meridian
  277. J3 = '(1+n1+5/4*n1^2+ 5/4*n1^3)*k3' 
  278. J4 = '(3*n1+3*n1^2+21/8*n1^3)*SIN(k3)*COS(k4)'
  279. J5 = '(15/8*n1^2+15/ 8*n1^3)*SIN(2*k3)*COS(2*k4)'
  280. J6 = '35/ 24*n1^3*SIN(3*k3)*COS(3*k4)'
  281. m  = 'b1*(J3 - J4 + J5 - J6)'
  282.  
  283. PHI     (uses n n0 n1 k0 a1 b1 and returns k k3 k4) Iteratively Calc Latitude k
  284. k  = '(n-n0)/a1+k0'             First approximation to Latitude
  285. REPEAT
  286.   k3 = 'k-k0'
  287.   k4 = 'k+k0'
  288.   call subroutine AOM,  uses  n1 k3 k4 b1 and returns m
  289.   Test= 'n-n0-m'
  290.   k  = 'k+(n-n0-m)/a1'
  291. UNTIL ABS(Test)<0.001
  292. k  = Test
  293.  
  294. ABNE     (uses a b f0 and returns a1 b1 n1 e2)
  295. a1 = 'a*f0'
  296. b1 = 'b*f0'                             Scale Major & Minor axes by f0
  297. n1 = '(a1-b1)/(a1+b1)'            calculate n from scaled axes
  298. e2 = '(a1^2-b1^2)/a1^2'          calculate e^2 (e2) from scaled axes
  299.  
  300.  
  301. 4. HP48 Routines: Descriptions
  302.  
  303. Transverse Mercator Projection Routines, to change to Latitude and Longitude,
  304. all latitude and longitude numbers are entered, and returned in DD.MMSSsss
  305. format.
  306.  
  307. ->NGR    Lat and Long to National Grid Reference (Great Britain). Put
  308.     Latitude on stack (north is +ve), then Longitude on stack
  309.     (east is +ve), returns a string of format "NT119779". The bottom
  310.     left corner of the 100m square defined.
  311.  
  312. NGR->    National Grid to Lat and Long. The inverse of ->NGR. Returns the
  313.     Lat and Long of the centre of the 100m square defined.
  314.  
  315. ->IGR    Lat and Long to Irish Grid Reference. Put Latitude on stack 
  316.     (north is +ve), then Longitude on stack (east is +ve), returns 
  317.     a string of format "T119779". The bottom left corner of the 100m 
  318.     square defined.
  319.  
  320. IGR->    Irish Grid to Lat and Long. The inverse of ->IGR. Returns the
  321.     Lat and Long of the centre of the 100m square defined.
  322.  
  323. ->XX6    Used by ->NGR and ->IGR to translate eastings and northings in metres
  324.     to a national grid reference, e.g. 311900 677900 become "NT119799".
  325.         Truncates accuracy to 100m, so result refers to the bottom left corner
  326.         of the grid reference 100metre square produced. If the coordinates do
  327.         not fall into one of the 4 500Km squares a "#" is returned in the 
  328.         first character of the string.
  329.  
  330. XX6->    Performs the inverse process of ->XX6. Returns the full eastings and
  331.         northings of the square centre refered to in metres, i.e. +50m is
  332.         added to the eastings and northings.
  333.  
  334. ->TMP    Performs the Transverse Mercator Projection. On entry the stack should
  335.     contain Lat, Long (both in radians), then all the constants in list 
  336.     AIRY or IRISH depending on what projection is being used. The routine 
  337.     returns eastings and northings on the stack in metres.
  338.  
  339. TMP->    Performs the inverse Transverse Mercator Projection. On entry the 
  340.     stack should contain eastings, northings, then all the constants in 
  341.     list AIRY or IRISH depending on what projection is being used. The 
  342.     routine returns latitude and longitude on the stack in radians.
  343.  
  344. VRH2    Used by ->TMP and TMP-> routines. Calculates v r & h2.
  345.  
  346. AOM    Used by ->TMP and PHI routines. Calculates Arc of Meridian, m.
  347.  
  348. PHI    Used by TMP-> routine. Iteratively calculates k k3 & k4.
  349.  
  350. ABNE    Used by ->TMP and TMP-> routines. Calculates a1 b1 n1 & e2.
  351.  
  352. PAD0    Used by ->XX6 routine
  353.  
  354. AIRY    List of constants used by TMP routines for Great Britain. See following
  355.     listing of object for comments on what individual elements are.
  356.  
  357. IRISH    List of constants used by TMP routines for Ireland. See following
  358.     listing of object for comments on what individual elements are.
  359.  
  360. External programs used (included in the listing for completeness):
  361.  
  362. PRESERVE Returns flags to initial state on program exit. Used in ->TMP TMP->
  363.     and ->XX6 routines.  See HP48SX Manual II page 555.
  364.  
  365. 5. HP48 Routines: Programs (ASCII DIR Object)    4256bytes    #25FEhex
  366. END_DOC
  367.  
  368. BEGIN_RPL mercator.rpl
  369. %%HP: T(3)A(D)F(.);
  370. DIR
  371. \->NGR
  372.   \<< HMS\-> D\->R SWAP HMS\-> D\->R  @ Change to degs decimal then rads
  373.   AIRY OBJ\-> DROP                    @ Put projection consts on stack
  374.   \->TMP                              @ Do projection, returns E&N on stack
  375.   \->XX6                              @ translate to grid letters + 6 nums
  376.   "NGR" \->TAG                        @ tag output
  377.   \>>
  378. @
  379. NGR\->
  380.   \<< XX6\->                          @ translate grid to full coordinates
  381.   AIRY OBJ\-> DROP                    @ put projection consts on stack
  382.   TMP\->                              @ do projection, returns Lat and Long
  383.   SWAP R\->D \->HMS "Lat\^o" \->TAG   @ translate to degrees decimal
  384.   SWAP R\->D \->HMS "Long\^o" \->TAG  @ and tag output
  385.   \>>
  386. @
  387. \->TMP                                @ Reference Transverse Mercator Proj'n
  388. \<<                                   @ Constants, Formulae and Methods.
  389.  \<< RAD \-> l k a b k0 l0 n0 e0 f0   @ Ordnance Survey Information March 83
  390.   \<< l l0 - k k0 - k k0 + \-> p k3 k4
  391.    \<< a b f0 ABNE \-> a1 b1 n1 e2
  392.     \<< n1 k3 k4 b1 AOM a1 e2 k VRH2
  393.     l l0 - k SIN k COS k TAN          @ Compute SIN(k) COS(k) & TAN(k) once 
  394.     \-> m v r h2 p s c t
  395.      \<< m n0 +                       @ Formula I
  396.      s c v 2 / * * p SQ *             @ Formula II  *p^2
  397.      'v/24*s*c^3*(5-t^2+9*h2)'
  398.      \->NUM p 4 ^ *                   @ Formula III *p^4
  399.      'v/720*s*c^5*(61-58*SQ(t)+t^4)' 
  400.      \->NUM p 6 ^ *                   @ Formula IIIA*p^6
  401.      + + +                            @ compute  northings
  402.      c v * p *                        @ Formula IV  *p
  403.      'v/6*c^3*(v/r-SQ(t))' \->NUM p 3 ^ * @ Formula V   *p^3
  404.      'v/120*c^5*(5-18*SQ(t)+t^4+14*h2
  405.      -58* SQ(t)*h2)' \->NUM p 5 ^ *   @ Formula VI  *p^5
  406.      + + e0 +                         @ compute eastings
  407.      SWAP
  408.      \>>
  409.     \>>
  410.    \>>
  411.   \>>
  412.  \>> PRESERVE                         @ Return to original flag settings
  413. \>>                                   @ See HP48 Manual II page 555
  414. @
  415. TMP\->                                @ Reference Transverse Mercator Proj'n
  416. \<<                                   @ Constants, Formulae and Methods.
  417.  \<< RAD \-> e n a b k0 l0 n0 e0 f0   @ Ordnance Survey Information March 83
  418.   \<< a b f0 ABNE e e0 - \-> a1 b1 n1 e2 y1
  419.    \<< n n0 n1 k0 a1 b1 PHI \-> k k3 k4
  420.     \<< a1 e2 k VRH2 k COS k TAN      @ Calculate COS(k) & TAN(k) for use later
  421.     \-> v r h2 c t
  422.      \<< k t 2 r v * * / y1 SQ *      @ Formula VII  *y1^2
  423.      't/(24*r*v^3)*(5+3*SQ(t)+h2
  424.      -9*SQ(t)*h2)' \->NUM y1 4 ^ *    @ Formula VIII *y1^4
  425.      't/(720*r*v^5)*(61+90*SQ(t)
  426.      +45*t^4)' \->NUM y1 6 ^ *        @ Formula IX   *y1^6
  427.      - - -                            @ Compute Latitude
  428.      c v * INV y1 *                   @ Formula X    *y1
  429.      '1/(c*6*v^3)*(v/r+2*SQ(t))' 
  430.      \->NUM y1 3 ^ *                  @ Formula XI   *y1^3
  431.      '1/(c *120*v^5)*(5+28*SQ(t)+24
  432.      *t^4)' \->NUM y1 5 ^ *           @ Formula XII  *y1^5
  433.      '1/(c*5040*v^7)*(61+662*SQ(t)+1320
  434.      *t^4+720*t^6)' \->NUM y1 7 ^ *   @ Formula XIIA *y1^7
  435.      - - - l0 +                       @ Compute Longitude
  436.      \>>
  437.     \>>
  438.    \>>
  439.   \>>
  440.  \>> PRESERVE                         @ Return to original flag settings
  441. \>>                                   @ See HP48 Manual II page 555
  442. @
  443. \->IGR
  444.   \<< HMS\-> D\->R SWAP HMS\-> D\->R  @ Same as \->NGR but since Irish grid
  445.   IRISH OBJ\-> DROP                   @ is only one 500Km square then the
  446.   \->TMP \->XX6                       @ initial grid letter "S" is dropped.
  447.   2 8 SUB "IGR" \->TAG
  448.   \>>
  449. @
  450. IGR\->
  451.   \<< DTAG "S" SWAP +                 @ Same as NGR\-> but since Irish grid
  452.   XX6\-> IRISH OBJ\-> DROP            @ is only one 500Km square then an
  453.   TMP\->                              @ extra "S" is added so the standard
  454.   SWAP R\->D \->HMS "Lat\^o" \->TAG   @ routines can be used.
  455.   SWAP R\->D \->HMS "Long\^o" \->TAG
  456.   \>>
  457. @
  458. \->XX6
  459.   \<<
  460.     \<< STD 100 / IP SWAP 100 / IP    @ throw away accuracy better than 100m
  461.     DUP2 5000 / IP SWAP 5000 / IP     @ break eastings and northings into
  462.     \-> n e es ns                     @ 100 metre units and 500Km units
  463.       \<<
  464.         IF es 0 ==
  465.         THEN                          @ for eastings 0 to 500000
  466.           CASE ns 2 ==                @ for northings 1000K to 1500K square H
  467.             THEN "H"
  468.             END
  469.             ns 1 ==                   @ for northings  500K to 1000K square N
  470.             THEN "N"
  471.             END
  472.             ns 0 ==                   @ for northings    0  to  500K square S
  473.             THEN "S"
  474.             END
  475.             "#"                       @ else illegal square denoted by a #
  476.           END
  477.         ELSE
  478.           ns 0 == es 1 == AND         @ for eastings 500K to 1000K AND
  479.           "T"                         @ northings 0 to 500K square T
  480.           "#"                         @ else illegal square denoted by a #
  481.           IFTE
  482.         END
  483.         e 1000 / IP 5 MOD 1 +         @ Compute a number for each 100Km square
  484.         4 n 1000 / IP 5 MOD -         @ within the 500Km square in the range
  485.         5 * + DUP                     @ 1 to 25 top left to bottom right
  486.         IF 8 \<=                      @ skip the number 8, gives 0-7,9-25
  487.         THEN 1 - 
  488.         END 65 + CHR +                @ translate to A to Z with I missing
  489.         e PAD0 n PAD0                 @ use PAD0 to pad e & n with leading 0's
  490.         + +
  491.       \>>
  492.     \>> PRESERVE                      @ Return to original flag settings
  493.   \>>                                 @ See HP48 Manual II page 555
  494. @
  495. XX6\->
  496.   \<< DUP 3 5 SUB                     @ Split incoming string into 4 parts
  497.   SWAP DUP 6 8 SUB                    @ and put them on stack
  498.   SWAP DUP NUM                        @ e.g. "NJ123456"
  499.   SWAP 2 2 SUB NUM 66 -               @       "123" "456" NUM(N) NUM(J)-66
  500.   DUP                                 @         e     n     f        s
  501.     IF 7 <                            @ NUM(J)-66 are translated to be
  502.     THEN 1 +                          @ contiguous top left to bottom right
  503.     END
  504.     CASE OVER 72 ==                   @ H square msdigits
  505.       THEN 0 2
  506.       END 
  507.       OVER 78 ==                      @ N square msdigits
  508.       THEN 0 1
  509.       END
  510.       OVER 83 ==                      @ S square msdigits
  511.       THEN 0 0
  512.       END
  513.       OVER 84 ==                      @ T square msdigits
  514.       THEN 1 0
  515.       END
  516.       "XX Error" DOERR                @ else display error
  517.     END
  518.     3 PICK 5 MOD 4 5 PICK 5 / IP 5 MOD -
  519.     \-> e n f s e1 n1 e2 n2
  520.     \<< e OBJ\-> e1 5000 *
  521.     e2 1000 * + + 100 * 50 +
  522.     n OBJ\-> n1 5000 *                @ recombine elements into full N&E 
  523.     n2 1000 * + + 100 * 50 +          @ adding 50 metres to return square ctr
  524.     \>>
  525.   \>>
  526. @
  527. VRH2                                  @ Compute v r and h2
  528.   \<< \-> a1 e2 k
  529.     \<< 'a1/\v/(1-e2* SIN(k)^2)' \->NUM
  530.     DUP
  531.     '(1-e2)/(1-e2*SIN(k)^2)' \->NUM * 
  532.     DUP2 / 1 -
  533.     \>>
  534.   \>>
  535. @
  536. AOM                                   @ Compute Developed Meridian Arc m
  537.   \<< 4 PICK DUP SQ SWAP 3 ^          @ Compute n1^2 and n1^3 only once
  538.   \-> n1 k3 k4 b1 n2 n3 
  539.     \<< '(1+n1+5/4*n2+5/4*n3)*k3' \->NUM
  540.     '(3*n1+3*n2+21/8*n3)*SIN(k3)*COS(k4)' \->NUM
  541.     '(15/8*n2+15/8*n3)*SIN(2*k3)*COS(2*k4)' \->NUM
  542.     '35/24*n3*SIN(3*k3)*COS(3*k4)' \->NUM
  543.     - - - b1 *                        @ on exit m is on stack
  544.     \>>
  545.   \>>
  546. @
  547. PHI                                   @ iteratively calculate Latitude k
  548.   \<< \-> n n0 n1 k0 a1 b1            @ stack to local variables
  549.     \<< '(n-n0)/a1+k0' \->NUM         @ first approximation to Latitude
  550.     0 0
  551.       DO
  552.       DROP2 DUP DUP k0 - SWAP k0 +
  553.       \-> k k3 k4
  554.         \<< n1 k3 k4 b1 AOM \-> m     @ re-compute arc of meridian
  555.           \<< n n0 - m - DUP
  556.             IF .001 <
  557.             THEN k
  558.             ELSE n n0 - m - a1 / k +
  559.             END
  560.             k3 k4
  561.           \>>
  562.         \>> 4 ROLL
  563.       UNTIL .001 <                   @ until error is less than 0.001
  564.       END
  565.     \>>                              @ returns k k3 k4 on stack
  566.   \>>
  567. @
  568. ABNE
  569.   \<< DUP ROT * 3 ROLLD * \-> b1 a1  @ scale a & b by f0 and call a1 and b1
  570.     \<< a1 b1 DUP2 - a1 b1 + /       @ calculate n from scaled axes
  571.       a1 SQ b1 SQ - a1 SQ /          @ calculate e^2 (e2) from scaled axes
  572.     \>>
  573.   \>>
  574. @
  575. PAD0
  576.   \<< 1000 MOD \->STR                @ take string from stack and
  577.     WHILE                            @ while it is shorter than 3 characters
  578.     DUP SIZE 3 <
  579.     REPEAT "0" SWAP +                @ add a leading "0"
  580.     END
  581.   \>>
  582. @
  583. @                                      Constants defining Transverse Mercator 
  584. AIRY {                               @ Projection for Airy Spheroid
  585.   6377563.396                        @ Major semi-axis m
  586.   6356256.91                         @ Minor semi-axis m
  587.   .855211333477                      @ True Origin 49 deg N        for
  588.   -3.490658E-2                       @              2 deg W    GREAT BRITAIN
  589.   -100000                            @ False Origin in m E of true origin
  590.   400000                             @                 m N of true origin
  591.   .9996012717 }                      @ Scale factor on Central meridian Fo
  592. @
  593. @                                      Constants defining Transverse Mercator 
  594. IRISH {                              @ Projection for Airy Spheroid
  595.   6377563.396                        @ Major semi-axis m
  596.   6356256.91                         @ Minor semi-axis m
  597.   .933751149817                      @ True Origin 53.5 deg N        for
  598.   -.139626340159                     @                8 deg W       IRELAND
  599.   250000                             @ False Origin in m E of true origin
  600.   200000                             @                 m N of true origin
  601.   1.000035 }                         @ Scale factor on Central meridian Fo
  602. @
  603. PRESERVE                             @ See HP48SX Manual II page 555.
  604. \<< RCLF \-> f                       @ May be more suitably located in HOME
  605.   \<< EVAL f STOF
  606.   \>>
  607. \>>
  608. END
  609. END_RPL
  610.  
  611.  
  612. BEGIN_ASC mercator.asc
  613. %%HP: T(3)A(D)F(.);
  614. "69A20FF7890200000080052554355425655480D9D20E1632916C11C432D6E201
  615. 066E1632EB3A1D6E201066F76C1EF53293632B2130850005094259435845047A
  616. 2033920600006933657736033920600000196526536033920999718941157339
  617. 0339209999510436269319339205000000000000520339205000000000000020
  618. 339200000000053000010B2130BA00040149425954047A203392060000693365
  619. 7736033920600000196526536033920999774333112558033920899000008560
  620. 9439339205000000000000019339205000000000000040339209990071721069
  621. 990B21309A000400514440340D9D20E1632339203000000000000010D4EB1B0B
  622. C13303278BF18B9C13F2A2EBBE1D5032D9D20C2A207000003DBBF176BA1B2130
  623. 4963293632B213028000401424E45440D9D20E163278BF1E0CF1EEDA13F2A20D
  624. CF1EEDA11C432D6E20202613D6E20201613E1632D6E20201613D6E202026132A
  625. BF190DA1D6E20201613D6E2020261376BA150FA1D6E20201613624B1D6E20202
  626. 613624B190DA1D6E20201613624B150FA1EF53293632B2130DD0003005849430
  627. D9D20E16321C432D6E2010E6D6E2020E603D6E2020E613D6E2020B603D6E2020
  628. 1613D6E20202613E16328BA20D6E2010E6D6E2020E60390DA1D6E2020161350F
  629. A1D6E2020B60376BA1B21304E5A14B2A24B2A23C0323FBF178BF178BF1D6E202
  630. 0B60390DA1DBBF1D6E2020B60376BA11C432D6E2010B6D6E2020B633D6E2020B
  631. 643E1632D6E2020E613D6E2020B633D6E2020B643D6E2020261384E203014F4D
  632. 41C432D6E2010D6E1632D6E2010E6D6E2020E60390DA1D6E2010D690DA178BF1
  633. 3CE22339207990000000000010EBBE1AFE22D6E2010B65BF22D9D20D6E2010E6
  634. D6E2020E60390DA1D6E2010D690DA1D6E2020161350FA1D6E2010B676BA1B213
  635. 05DF22D6E2020B633D6E2020B643EF532EF532803A25BCF1DE03233920799000
  636. 0000000010EBBE19B632EF53293632B2130D62003014F4D430D9D20E1632803A
  637. 2A9CF178BF1624B1DBBF13F2A2D20B11C432D6E2020E613D6E2020B633D6E202
  638. 0B643D6E20202613D6E2020E623D6E2020E633E16328BA209C2A2D6E2020E613
  639. 76BA1D13A2803A250FA1D6E2020E623EEDA176BA1D13A2803A250FA1D6E2020E
  640. 633EEDA176BA1D6E2020B633EEDA1B21304E5A18BA203F2A2D6E2020E613EEDA
  641. 13F2A2D6E2020E623EEDA176BA1339201000000000000120C53A250FA1D6E202
  642. 0E633EEDA176BA1D6E2020B633CA4B1EEDA1D6E2020B643505B1EEDA1B21304E
  643. 5A18BA20339201000000000000510C53A250FA1D6E2020E623EEDA1339201000
  644. 000000000510C53A250FA1D6E2020E633EEDA176BA1ED2A2D6E2020B633EEDA1
  645. CA4B1EEDA1ED2A2D6E2020B643EEDA1505B1EEDA1B21304E5A18BA2033920100
  646. 000000000053033920100000000000042050FA1D6E2020E633EEDA13F2A2D6E2
  647. 020B633EEDA1CA4B1EEDA13F2A2D6E2020B643EEDA1505B1EEDA1B21304E5A19
  648. 0DA190DA190DA1D6E20202613EEDA1EF53293632B213050300406525842340D9
  649. D20E16321C432D6E20201613D6E20205623D6E2010B6E16328BA20D6E2020161
  650. 39C2A2D6E20205623D6E2010B6CA4B1ED2A2D20B1EEDA190DA1473B150FA1B21
  651. 304E5A178BF18BA209C2A2D6E2020562390DA19C2A2D6E20205623D6E2010B6C
  652. A4B1ED2A2D20B1EEDA190DA150FA1B21304E5A1EEDA12ABF150FA19C2A290DA1
  653. EF53293632B2130D110040858563D840D9D20E163278BF13F2A2D13A2C58C1DB
  654. BF178BF1233A2C53A2C58C1DBBF178BF164BC1DBBF1ED2A2ED2A2C58C164BC13
  655. 3920100000000000066090DA178BF13CE22743A2EBBE1AFE22D9D209C2A276BA
  656. 1B21305DF22D8732D9D2092CF1339201000000000000270279E18A732D9D204B
  657. 2A2ED2A2B21305DF2292CF1339201000000000000870279E18A732D9D204B2A2
  658. 9C2A2B21305DF2292CF1339201000000000000380279E18A732D9D204B2A24B2
  659. A2B21305DF2292CF1339201000000000000480279E18A732D9D209C2A24B2A2B
  660. 21305DF22C2A2051000858502542727F627933A1B21305DF223F2A2A9CF1D13A
  661. 2D4EB1803A2D13A2A9CF1D13A250FA1D6BB1D13A2D4EB190DA11C432D6E20105
  662. 6D6E2010E6D6E201066D6E201037D6E20205613D6E2020E613D6E20205623D6E
  663. 2020E623E1632D6E201056B7FC1D6E20205613339203000000000000050EEDA1
  664. D6E20205623339203000000000000010EEDA176BA176BA133920200000000000
  665. 0010EEDA133920100000000000005076BA1D6E2010E6B7FC1D6E2020E6133392
  666. 03000000000000050EEDA1D6E2020E623339203000000000000010EEDA176BA1
  667. 76BA1339202000000000000010EEDA133920100000000000005076BA1EF53293
  668. 632B21304B30040D885856340D9D20E1632C9432D9D20E1632684C1339202000
  669. 00000000001050FA1D6BB1DBBF133920200000000000001050FA1D6BB12ABF13
  670. 3920300000000000005050FA1D6BB1DBBF133920300000000000005050FA1D6B
  671. B11C432D6E2010E6D6E201056D6E20205637D6E2020E637E16323CE22D6E2020
  672. 56374B2A2279E1AFE22D9D20D8732D9D20D6E2020E637ED2A2279E18A732C2A2
  673. 070000845DF22D6E2020E6379C2A2279E18A732C2A2070000E45DF22D6E2020E
  674. 6374B2A2279E18A732C2A2070000355DF22C2A207000032B21305DF22B21305B
  675. F22D9D20D6E2020E6374B2A2279E1D6E202056379C2A2279E1387E1C2A207000
  676. 045C2A207000032EF3A1B21305DF22D6E20105633920300000000000001050FA
  677. 1D6BB1D13A2D4EB19C2A276BA1803A2D6E2010E633920300000000000001050F
  678. A1D6BB1D13A2D4EB190DA1D13A2EEDA176BA178BF13CE22C53A2CFCE1AFE22D9
  679. D209C2A290DA1B21305DF2233920100000000000056076BA166BC176BA1D6E20
  680. 105684E204005144403D6E2010E684E20400514440376BA176BA1EF53293632B
  681. 213084E2080052554355425655493632B21308530040947425D840D9D20E1632
  682. 33622C2A207000035DBBF176BA184E2040858563D884E20509425943584B7FC1
  683. 8DBF184E204045D405D8DBBF14FEB1E1FB1C2A20D0000C416470BEB522DBBF14
  684. FEB1E1FB1C2A20F0000C4F6E6760BEB52293632B21302C00040D894742540D9D
  685. 20E1632E3FB18CEB1DBBF1E3FB18CEB184E20509425943584B7FC18DBF184E20
  686. 40D845D40584E2040D8858563ED2A2C53A2C58C1C2A20B0000947425EB522936
  687. 32B2130690004045D405D840D9D20E1632C9432D9D20E16324B3C11C432D6E20
  688. 1056D6E2010E6D6E201016D6E201026D6E2020B603D6E2020C603D6E2020E603
  689. D6E20205603D6E20206603E1632D6E201016D6E201026D6E2020660384E20401
  690. 424E454D6E201056D6E2020560390DA11C432D6E20201613D6E20202613D6E20
  691. 20E613D6E20205623D6E20209713E1632D6E2010E6D6E2020E603D6E2020E613
  692. D6E2020B603D6E20201613D6E2020261384E20300584941C432D6E2010B6D6E2
  693. 020B633D6E2020B643E1632D6E20201613D6E20205623D6E2010B684E2040652
  694. 58423D6E2010B6505B1D6E2010B6E55B11C432D6E201067D6E201027D6E20208
  695. 623D6E201036D6E201047E1632D6E2010B6D6E201047ED2A2D6E201027D6E201
  696. 067EEDA1EEDA150FA1D6E20209713624B1EEDA18BA20D6E20104733920100000
  697. 0000000420D6E201027EEDA1D6E2010673F2A2D20B1EEDA150FA1D13A23F2A2D
  698. 6E201047624B1EEDA176BA1D6E2020862376BA1173A2D6E201047624B1EEDA1D
  699. 6E20208623EEDA190DA1EEDA1B21304E5A1D6E20209713803A2D20B1EEDA18BA
  700. 20D6E201047339202000000000000270D6E201027EEDA1D6E201067D13A2D20B
  701. 1EEDA150FA1339201000000000000160339201000000000000090D6E20104762
  702. 4B1EEDA176BA1339201000000000000540D6E201047803A2D20B1EEDA176BA1E
  703. EDA1B21304E5A1D6E20209713233A2D20B1EEDA190DA190DA190DA1D6E201036
  704. D6E201067EEDA1872B1D6E20209713EEDA18BA209C2A2D6E201036233A2EEDA1
  705. D6E2010673F2A2D20B1EEDA150FA1D6E201067D6E20102750FA1ED2A2D6E2010
  706. 47624B1EEDA176BA1EEDA1B21304E5A1D6E202097133F2A2D20B1EEDA18BA209
  707. C2A2D6E201036339202000000000000210EEDA1D6E201067D13A2D20B1EEDA15
  708. 0FA1D13A2339201000000000000820D6E201047624B1EEDA176BA13392010000
  709. 00000000420D6E201047803A2D20B1EEDA176BA1EEDA1B21304E5A1D6E202097
  710. 13D13A2D20B1EEDA18BA209C2A2D6E201036339203000000000004050EEDA1D6
  711. E201067743A2D20B1EEDA150FA13392010000000000001603392020000000000
  712. 02660D6E201047624B1EEDA176BA1339203000000000002310D6E201047803A2
  713. D20B1EEDA176BA1339202000000000000270D6E201047233A2D20B1EEDA176BA
  714. 1EEDA1B21304E5A1D6E20209713743A2D20B1EEDA190DA190DA190DA1D6E2020
  715. C60376BA1EF532EF532EF532EF53293632B213084E2080052554355425655493
  716. 632B2130C370040D845D40540D9D20E1632C9432D9D20E16324B3C11C432D6E2
  717. 010C6D6E2010B6D6E201016D6E201026D6E2020B603D6E2020C603D6E2020E60
  718. 3D6E20205603D6E20206603E1632D6E2010C6D6E2020C60390DA1D6E2010B6D6
  719. E2020B60390DA1D6E2010B6D6E2020B60376BA11C432D6E201007D6E2020B633
  720. D6E2020B643E1632D6E201016D6E201026D6E2020660384E20401424E4541C43
  721. 2D6E20201613D6E20202613D6E2020E613D6E20205623E1632D6E2020E613D6E
  722. 2020B633D6E2020B643D6E2020261384E203014F4D4D6E20201613D6E2020562
  723. 3D6E2010B684E204065258423D6E2010C6D6E2020C60390DA1D6E2010B6CA4B1
  724. D6E2010B6505B1D6E2010B6E55B11C432D6E2010D6D6E201067D6E201027D6E2
  725. 0208623D6E201007D6E201037D6E201036D6E201047E1632D6E2010D6D6E2020
  726. E60376BA1D6E201037D6E201036D6E201067ED2A250FA1EEDA1EEDA1D6E20100
  727. 7624B1EEDA18BA20D6E20106733920100000000000042050FA1D6E201037EEDA
  728. 1D6E2010363F2A2D20B1EEDA1D13A2D6E201047ED2A2D20B190DA1173A2D6E20
  729. 208623EEDA176BA1EEDA1B21304E5A1D6E201007803A2D20B1EEDA18BA20D6E2
  730. 0106733920200000000000027050FA1D6E201037EEDA1D6E201036D13A2D20B1
  731. EEDA1339201000000000000160339201000000000000850D6E201047624B1EED
  732. A190DA1D6E201047803A2D20B176BA1EEDA1B21304E5A1D6E201007233A2D20B
  733. 1EEDA176BA176BA176BA1D6E201036D6E201067EEDA1D6E201007EEDA18BA20D
  734. 6E201067233A250FA1D6E2010363F2A2D20B1EEDA1D6E201067D6E20102750FA
  735. 1D6E201047624B190DA1EEDA1B21304E5A1D6E2010073F2A2D20B1EEDA18BA20
  736. D6E20106733920200000000000021050FA1D6E201036D13A2D20B1EEDA1D13A2
  737. 339201000000000000810D6E201047624B1EEDA190DA1D6E201047803A2D20B1
  738. 76BA1339201000000000000410D6E20208623EEDA176BA133920100000000000
  739. 0850D6E201047624B1EEDA1D6E20208623EEDA190DA1EEDA1B21304E5A1D6E20
  740. 1007D13A2D20B1EEDA176BA176BA1D6E2020560376BA1DBBF1EF532EF532EF53
  741. 2EF53293632B213084E2080052554355425655493632B21304660040E47425D8
  742. 40D9D20E163284E2040858563D884E204014942595B7FC18DBF184E204045D40
  743. 5D8DBBF14FEB1E1FB1C2A20D0000C416470BEB522DBBF14FEB1E1FB1C2A20F00
  744. 00C4F6E6760BEB52293632B21305A00040D8E4742540D9D20E1632E3FB18CEB1
  745. DBBF1E3FB18CEB184E204014942595B7FC18DBF184E2040D845D40584E2040D8
  746. 858563C2A20B0000E47425EB52293632B213007E6"
  747. END_ASC
  748.  
  749.  
  750. BYTES: #6E70h 4255
  751.  
  752. BEGIN_UU mercator.uue
  753. begin 644 mercator
  754. M2%!(4#0X+466*O!_F"`````(4%)%4T525D4(G2W@82,9QA%,(VTN$&#F82.^I
  755. MH]'F`@%F?\;A7R,Y-K(2`U@`4)`DE32%5$"G`C,I8```EC-6=V,PDP(&``"1:
  756. M5F(U!C,ID)D7F!11-Y,PDP*9F15`8V(YD3,I4````````"4PDP(%````````]
  757. M`C,I`````%`#`!"P$@.K`$`0E"2514"G`C,I8```EC-6=V,PDP(&``"15F(UW
  758. M!C,ID)EW-#,14H4PDP*8"0``6`9)DS,I4````````!`YDP(%````````!#,I#
  759. MD)D`%R<!EIFP$@.I`$``%40$0]#9`AXV,I,"`P````````%-OK&P'#,P<K@?N
  760. MN,DQ+RJ^Z]$%(YTMP*("!P``T[L?9ZNQ$@.4-I)C(RLQ(`@`!$%"3D4$G2W@)
  761. M82.'^^'`'^ZM,2\JT/SAWAK!--+F`@)B,6TN(!`6XV$C;2X@$!;3Y@("8C&B9
  762. M^Y'0&FTN(!`6T^8"`F(Q9ZM1\!IM+B`0%F-"&VTN("`68T(;":W1Y@("83$F*
  763. MM%'P&OXUDF,C*S'0#0`#4$A)`YTMX&$CP332Y@(!;FTN(.`&T^8"`FXQ;2X@8
  764. ML`;3Y@("83%M+B`@%N-A([@JT.8"`6YM+B#@!I/0&FTN(!`64_`:;2X@L`9S=
  765. MMAHK,4!>&K2B0BLJPS`ROQ^'^W&X'VTN(+`&D]`:O?O1Y@(":S!GJQ%,(VTN?
  766. M$+#6Y@(":S-M+B"P1N-A(VTN(.`6T^8"`FLS;2X@L$;3Y@("8C%(+C`0]-04U
  767. M3"-M+A#0YF$C;2X0X-;F`@)N,`FMT>8"`6T)K7&X'\,N,I,"EPD```````&^!
  768. MZZ'O(FTN$+!6^R*=+=#F`@%N;2X@X`:3T!IM+A#0EM`:;2X@$!93\!IM+A"PB
  769. M=K8:*S%0_2)M+B"P-M/F`@)K-/XUXE\C"*-2RQ_M,#*3`I<)```````!ONN1+
  770. M:R/^-9)C(RLQT"8``T%/30.=+>!A(PBCHLD?A_MA0AN]^S$O*BVP$4PC;2X@U
  771. MX!;3Y@(":S-M+B"P1M/F`@)B,6TN(.`FT^8"`FXS'C:"JP+)HM+F`@)N,6>K'
  772. MT3$J"*-2\!IM+B#@)N/>&F>KT3$J"*-2\!IM+B#@-N/>&F>KT>8"`FLS[JVQY
  773. M$@/DI8&K`O.BTN8"`FXQ[JTQ+RIM+B#@)N/>&F>K,9,"`0``````$`)<HU+P]
  774. M&FTN(.`VX]X:9ZO1Y@(":S.LM.'>&FTN(+!&4U`;[JVQ$@/DI8&K`C,I$```[
  775. M`````!7`-2H%K]'F`@)N,NZM,9,"`0``````4`%<HU+P&FTN(.`VX]X:9ZOA%
  776. M+2IM+B"P-N/>&JRTX=X:WJ+2Y@(":S3NK5%0&^ZML1(#Y*6!JP(S*1``````X
  777. M```U,),"`0``````0`(%K]'F`@)N,^ZM,2\J;2X@L#;CWAJLM.'>&O.BTN8"'
  778. M`FLT[JU14!ONK;$2`^2ED=`:":V1T!IM+B`@%N/>&OXUDF,C*S%0,``$5E)(R
  779. M,@2=+>!A(\$TTN8"`F$Q;2X@4";3Y@(!:QXV@JL";2X@$!:3+"IM+B!0)M/F8
  780. M`@%KK+3A+2HML.'>&@FM03<;!:^Q$@/DI7&X'[@JD"PJ;2X@4":3T!K)HM+F`
  781. M`@)E,FTN$+#&2AO>HM("&^ZMD=`:!:^Q$@/DI>'>&J+[4?`:R:*2T!K^-9)C'
  782. M(RLQT!$`!%A8-HT$G2W@82.'^S$O*AVCPH4<O?MQN!\RH\(U*ES(T;L?A_MA7
  783. MM!R]^^$M*MZBPH4<1LLQDP(!``````!@!@FM<;@?PRYR-"J^ZZ'O(ITMD"PJG
  784. M9ZNQ$@/5+])X(YTMD,(?,RD0````````<B"7'J@WTMD"M*+B+2HK,5#](BG\6
  785. M,9,"`0``````@`=RZ8%Z(YTM0"LJR:*R$@/5+Y+"'S,I$````````(,@EQZH-
  786. M-]+9`K2B0BLJ*S%0_2(I_#&3`@$``````$`(<NF!>B.=+9`L*K2BLA(#U2_"I
  787. MH@(5`("%!5(D)_<FES,:*S%0_2+SHJ+)'QVCTN0;"*/2,2J:_-$Q*@6OT;8;D
  788. M':/2Y!L)K1%,(VTN$%#6Y@(!;FTN$Y@(!<VTN(%`6T^8"`FXQ;2X@4";3%
  789. MY@(";C(>-M+F`@%E>\_1Y@("93$S*3````````!0X-X:;2X@4"8SDP(#````V
  790. M`````>ZM<;8:9ZLQDP("`````````>ZM,9,"`0````````5GJ]'F`@%N>\_11
  791. MY@(";C$S*3````````!0X-X:;2X@X"8SDP(#`````````>ZM<;8:9ZLQDP(""
  792. M`````````>ZM,9,"`0````````5GJ^%?(SDVLA(#M`-`T(B%94/0V0(>-L))=
  793. M(YTMX&$CAL0QDP("`````````06OT;8;O?LQDP("`````````06OT;8;HOLQ>
  794. MDP(#````````!06OT;8;O?LQDP(#````````!06OT;8;P332Y@(!;FTN$%#6H
  795. MY@("97-M+B#@-N=A(\,NTN8"`F5SM*(BEQ[Z+M+9`HTWTMD";2X@X#;G+2IR:
  796. MZ8%Z(RPJ<```2-4OTN8"`FYSR:(BEQZH-\*B`@<`X%3](FTN(.`V1RLJ<NF!#
  797. M>B,L*G```%/5+\*B`@<`,+(2`]4OLA(#M2_2V0)M+B#@-D<K*G+IT>8"`F5S=
  798. MR:(BEQZ#Y\&B`@<`0,6B`@<`,.(_&BLQ4/TB;2X04#:3`@,````````!!:_1B
  799. MMAL=H]+D&\FB<K8:"*/2Y@(!;C,I,````````!!0\!IMN]$Q*DV^D=`:':/B0
  800. MWAIGJW&X'\,NPC4J_.RA[R*=+9`L*@FML1(#U2\RDP(!``````!0!F>K8;8<8
  801. M9ZO1Y@(!94@N0``51`33Y@(!;D@N0``51`1SMAIGJ^%?(SDVLA(#2"Z``"55&
  802. M-%4D95648R,K,8`U``1)1U*-!)TMX&$C,R;"H@('`##5NQ]GJX'D`@186#:-I
  803. M2"Y0D"25-(6T]QS8^X'D`@1435"-O?M![QL>O\&B`@T`P!1&!^M;(KW[0>\;Q
  804. M'K_!H@(/`,#TYG8&ZULB.3:R$@/"`$#0F'0D1=#9`AXVXO,;R+[1NQ\^OX'L,
  805. M&T@N4)`DE32%M/<<V/N!Y`($C51-4$@N0-"(A67C+2I<H\*%'"PJL```24=22
  806. MOB628R,K,6`)``1435"-!)TMX&$CG#32V0(>-D([',$TTN8"`65M+A#@UN8"K
  807. M`6%M+A`@UN8"`FLP;2X@P`;3Y@(";C!M+B!0!M/F`@)F,!XVTN8"`6%M+A`@`
  808. MUN8"`F8P2"Y`$"3D5-3F`@%E;2X@4`:3T!K!--+F`@)A,6TN("`6T^8"`FXQ5
  809. M;2X@4";3Y@(">3$>-M+F`@%N;2X@X`;3Y@(";C%M+B"P!M/F`@)A,6TN("`6K
  810. M@^0"`U!(2<$TTN8"`6MM+B"P-M/F`@)K-!XVTN8"`F$Q;2X@4";3Y@(!:T@N\
  811. M0&`EA233Y@(!:P6UT>8"`6M>M1%,(VTN$Y@(!<FTN((`FT^8"`6-M+A!`P
  812. MYV$C;2X0L-;F`@%TWJ+2Y@(!<FTN$&#GWAKNK5'P&FTN()`78T(;[JV!JP)M/
  813. M+A!`-Y,"`0``````0`)M+A`@Y]X:;2X08#<O*BVPX=X:!:_1,2KSHM+F`@%T%
  814. M)K3AWAIGJ]'F`@)H,F>K$3<J;2X00&="&^ZMT>8"`F@R[JV1T!KNK;$2`^2E1
  815. MT>8"`GDQ"*/2`AONK8&K`FTN$$`WDP("```````@!VTN$"#GWAIM+A!@US$JF
  816. M+;#AWAH%KS&3`@$``````!`&,RD0````````D-#F`@%T)K3AWAIGJS&3`@$``
  817. M`````%`$;2X00(<P*BVPX=X:9ZOAWAHK,4!>&FTN()`7(S,J+;#AWAH)K9'0]
  818. M&@FMT>8"`6-M+A!@Y]X:>++1Y@(">3'NK8&K`LFBTN8"`6,RH^+>&FTN$&`WN
  819. M+RHML.'>&@6OT>8"`79M+A`@5_`:WJ+2Y@(!=":TX=X:9ZOAWAHK,4!>&FTNN
  820. M()`7,R\J+;#AWAJX*I`L*FTN$#`VDP("```````@`>ZMT>8"`78=H]("&^ZM3
  821. M4?`:':,RDP(!``````"``FTN$$!G0AONK7&V&C,I$````````"30Y@(!=`BC:
  822. MT@(;[JUQMAKNK;$2`^2ET>8"`GDQ':/2`AONK8&K`LFBTN8"`6,S*3``````X
  823. M`$!0X-X:;2X08'<T*BVPX=X:!:\QDP(!```````0!C,I(```````(&;0Y@(!Z
  824. M=":TX=X:9ZLQDP(#```````R`6TN$$"',"HML.'>&F>K,9,"`@``````(`=MZ
  825. M+A!`)S,J+;#AWAIGJ^'>&BLQ0%X:;2X@D!=S-"HML.'>&@FMD=`:":W1Y@("B
  826. M;#!GJ^%?(_XUXE\C_C628R,K,8#D`@A04D5315)613DVLA(#/`=`T$C5!$70L
  827. MV0(>-L))(YTMX&$CM,,13"-M+A#`UN8"`6MM+A`0UN8"`6)M+B"P!M/F`@)L;
  828. M,&TN(.`&T^8"`F4P;2X@8`;C82-M+A#`UN8"`FPP":W1Y@(!:VTN(+`&D]`:#
  829. M;2X0L-;F`@)K,&>K$4PC;2X0`-?F`@)K,VTN(+!&XV$C;2X0$-;F`@%B;2X@*
  830. M8`:#Y`($04).1<$TTN8"`F$Q;2X@(!;3Y@(";C%M+B!0)N-A(VTN(.`6T^8"[
  831. M`FLS;2X@L$;3Y@("8C%(+C`0]-34Y@("83%M+B!0)M/F`@%K2"Y`8"6%)-/F(
  832. M`@%L;2X@P`:3T!IM+A"PQDH;;2X0L%90&VTN$+#F51O!--+F`@%M;2X08-?FK
  833. M`@%R;2X@@";3Y@(!<&TN$##7Y@(!8VTN$$#G82-M+A#0UN8"`FXP9ZO1Y@(!:
  834. M<VTN$##6Y@(!=MZB4O`:[JWAWAIM+A``9T(;[JV!JP)M+A!@-Y,"`0``````=
  835. M0`(%K]'F`@%S[JW1Y@(!8_.BT@(;[JW1,2IM+A!`YRTJ+;"1T!IQH]+F`@)H=
  836. M,NZM<;8:[JVQ$@/DI='F`@%P"*/2`AONK8&K`FTN$&`WDP("```````@!P6O1
  837. MT>8"`7/NK='F`@%C':/2`AONK3&3`@$``````!`&,RD0````````6-#F`@%T6
  838. M)K3AWAH)K='F`@%T"*/2`AMGJ^'>&BLQ0%X:;2X0`"<S*BVPX=X:9ZMQMAIGH
  839. MJ]'F`@%C;2X08.?>&FTN$`#GWAJX*M#F`@%V,J-2\!IM+A`P-B\J+;#AWAIMV
  840. M+A!@U^8"`7(%K]'F`@%T)K21T!KNK;$2`^2ET>8"`7#SHM("&^ZM@:L";2X0"
  841. M8#>3`@(``````"`!!:_1Y@(!8QVCT@(;[JW1,2HS*1`````````8T.8"`70F?
  842. MM.'>&@FMT>8"`70(H]("&V>K,9,"`0``````0`%M+B"`)N/>&F>K,9,"`0``X
  843. M````@`5M+A!`9T(;[JW1Y@(":#+NK9'0&NZML1(#Y*71Y@(!<!VCT@(;[JUQH
  844. MMAIGJ]'F`@)E,&>KT;L?_C7B7R/^->)?(SDVLA(#2"Z``"55-%4D95648R,K#
  845. M,4!F``1.1U*-!)TMX&$C2"Y`@(5ETXCD`@1!25)9>\^!O1](+D!`U035V+L?W
  846. M]+[A\1LL*M```$QA=+"^)=*['_2^X?$;+"KP``!,;VYGL+XEDF,C*S%0"@`$@
  847. MC4Y'4@2=+>!A(SZ_@>P;O?OA\QO(OH'D`@1!25)9>\^!O1](+D#02-4$A>0")
  848. 5!(U86#8L*K```$Y'4KXEDF,C*S$`"
  849. ``
  850. end
  851. END_UU
  852.